package com.techsoul.common.core.constant;

public class ApiConstants {

    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";


    /**
     * 系统内置用户编码，用于记录系统自动操作
     */
    public static final String DEFAULT_USER_ID = "0";

    /**
     * 系统返回编码：操作成功-0，操作失败-非0
     */
    public static final Integer RESULT_CODE_SUCCESS = 200;

    /**
     * 系统返回消息：操作成功
     */
    public static final String RESULT_MESSAGE_SUCCESS = "操作成功";

    /**
     * 常量-Y
     */
    public static final String Y = "1";

    /**
     * 常量-N
     */
    public static final String N = "0";

    /**
     * redis 缓存默认超时时间
     */
    public static final Long REDIS_TTL = 3600000L;

    /**
     * 授权功能的请求头名称
     */
    public static final String HTTP_HEADER_AUTHORIZATION = "Authorization";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 通用成功标识
     */
    public static final String SUCCESS = "0";

    /**
     * 通用失败标识
     */
    public static final String FAIL = "1";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 验证码有效期（分钟）
     */
    public static final Long CAPTCHA_EXPIRATION = 2L;

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 登录用户token key
     */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";

    /**
     * 防重提交 redis key
     */
    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";

    /**
     * 令牌
     */
    public static final String TOKEN = "token";

    /**
     * 令牌 前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";

    /**
     * 登录用户key 前缀
     */
    public static final String LOGIN_USER_KEY = "login_user_key";

    /**
     * 系统配置key 前缀
     */
    public static final String SYS_CONFIG_KEY_PREFIX = "sys_config:";

    /**
     * 数据字典key 前缀
     */
    public static final String SYS_DICT_KEY_PREFIX = "sys_dict:";

    /**
     * 分类商品key 前缀
     */
    public static final String CATEGORY_GOODS_KEY = "category_goods_key";

    /**
     * 商品访问记录key 前缀
     */
    public static final String GOODS_VIEW_KEY = "goods_view_key:";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * 购物车 前缀
     */
    public static final String CART_PREFIX = "cart:";

    /**
     * 工作流，审核-通过
     */
    public static final String ACT_AUDIT_PASS = "yes";

    /**
     * 工作流，审核-驳回
     */
    public static final String ACT_AUDIT_REJECT = "no";

}
